package com.wisdomparking.bean;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

public class VehicleInfo implements Serializable {
    private Integer id;

    private Integer userId;

    private String plateNumber;

    private String engineNumber;

    private Boolean validatingState;

    private Boolean activatedState;

    private String vehicleLicensePic;

    private Boolean vehicleType;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private Boolean delFlag;

    private Boolean isDefault;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getPlateNumber() {
        return plateNumber;
    }

    public void setPlateNumber(String plateNumber) {
        this.plateNumber = plateNumber;
    }

    public String getEngineNumber() {
        return engineNumber;
    }

    public void setEngineNumber(String engineNumber) {
        this.engineNumber = engineNumber;
    }

    public Boolean getValidatingState() {
        return validatingState;
    }

    public void setValidatingState(Boolean validatingState) {
        this.validatingState = validatingState;
    }

    public Boolean getActivatedState() {
        return activatedState;
    }

    public void setActivatedState(Boolean activatedState) {
        this.activatedState = activatedState;
    }

    public String getVehicleLicensePic() {
        return vehicleLicensePic;
    }

    public void setVehicleLicensePic(String vehicleLicensePic) {
        this.vehicleLicensePic = vehicleLicensePic;
    }

    public Boolean getVehicleType() {
        return vehicleType;
    }

    public void setVehicleType(Boolean vehicleType) {
        this.vehicleType = vehicleType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Boolean getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Boolean delFlag) {
        this.delFlag = delFlag;
    }

    public Boolean getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(Boolean isDefault) {
        this.isDefault = isDefault;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        VehicleInfo other = (VehicleInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getPlateNumber() == null ? other.getPlateNumber() == null : this.getPlateNumber().equals(other.getPlateNumber()))
            && (this.getEngineNumber() == null ? other.getEngineNumber() == null : this.getEngineNumber().equals(other.getEngineNumber()))
            && (this.getValidatingState() == null ? other.getValidatingState() == null : this.getValidatingState().equals(other.getValidatingState()))
            && (this.getActivatedState() == null ? other.getActivatedState() == null : this.getActivatedState().equals(other.getActivatedState()))
            && (this.getVehicleLicensePic() == null ? other.getVehicleLicensePic() == null : this.getVehicleLicensePic().equals(other.getVehicleLicensePic()))
            && (this.getVehicleType() == null ? other.getVehicleType() == null : this.getVehicleType().equals(other.getVehicleType()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
            && (this.getIsDefault() == null ? other.getIsDefault() == null : this.getIsDefault().equals(other.getIsDefault()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getPlateNumber() == null) ? 0 : getPlateNumber().hashCode());
        result = prime * result + ((getEngineNumber() == null) ? 0 : getEngineNumber().hashCode());
        result = prime * result + ((getValidatingState() == null) ? 0 : getValidatingState().hashCode());
        result = prime * result + ((getActivatedState() == null) ? 0 : getActivatedState().hashCode());
        result = prime * result + ((getVehicleLicensePic() == null) ? 0 : getVehicleLicensePic().hashCode());
        result = prime * result + ((getVehicleType() == null) ? 0 : getVehicleType().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        result = prime * result + ((getIsDefault() == null) ? 0 : getIsDefault().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", plateNumber=").append(plateNumber);
        sb.append(", engineNumber=").append(engineNumber);
        sb.append(", validatingState=").append(validatingState);
        sb.append(", activatedState=").append(activatedState);
        sb.append(", vehicleLicensePic=").append(vehicleLicensePic);
        sb.append(", vehicleType=").append(vehicleType);
        sb.append(", createTime=").append(createTime);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", isDefault=").append(isDefault);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}